
<%@ page import="baratopradedeu.Oferta" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'oferta.label', default: 'Oferta')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.nova.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.show.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.id.label" default="Id" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "id")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.categoriaOferta.label" default="Categoria Oferta" /></td>
                            
                            <td valign="top" class="value"><g:link controller="categoriaOferta" action="show" id="${ofertaInstance?.categoriaOferta?.id}">${ofertaInstance?.categoriaOferta?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.dataFinal.label" default="Data Final" /></td>
                            
                            <td valign="top" class="value"><g:formatDate date="${ofertaInstance?.dataFinal}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.dataInicial.label" default="Data Inicial" /></td>
                            
                            <td valign="top" class="value"><g:formatDate date="${ofertaInstance?.dataInicial}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.destaque.label" default="Destaque" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "destaque")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.imagem.label" default="Imagem" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "imagem")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.parceiro.label" default="Parceiro" /></td>
                            
                            <td valign="top" class="value"><g:link controller="parceiro" action="show" id="${ofertaInstance?.parceiro?.id}">${ofertaInstance?.parceiro?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.qtdMax.label" default="Qtd Max" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "qtdMax")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.qtdMinima.label" default="Qtd Minima" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "qtdMinima")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.regras.label" default="Regras" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "regras")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.titulo.label" default="Titulo" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "titulo")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.valorDesconto.label" default="Valor Desconto" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "valorDesconto")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="oferta.valorOriginal.label" default="Valor Original" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ofertaInstance, field: "valorOriginal")}</td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="nav">
                <g:form >
                    <g:hiddenField name="id" value="${ofertaInstance?.id}" />
					<g:hiddenField name="ofertaId" value="${ofertaId}" />
                    <!--
					<span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
					-->
					<span class="menuButton">
						<g:link class="create" controller="pedido" action="comprar" params="[ofertaId:ofertaInstance.id]">
						  <g:message code="default.comprar.label" args="[entityName]" />
						</g:link>
					  </span>
				</g:form>
				
            </div>
        </div>
    </body>
</html>
